CollectionBase Generic Class

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

CollectionBase is a base class that can be used to more easily implement the generic ICollection<T> and non-generic ICollection interfaces.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
[SerializableAttribute]
public abstract class CollectionBase<T> : ICollection<T>, 
	IEnumerable<T>, ICollection, IEnumerable
Visual Basic (Declaration)
<SerializableAttribute> _
Public MustInherit Class CollectionBase(Of T) _
	Implements ICollection(Of T), IEnumerable(Of T),  _
	ICollection, IEnumerable
Visual C++
[SerializableAttribute]
generic<typename T>
public ref class CollectionBase abstract : ICollection<T>, 
	IEnumerable<T>, ICollection, IEnumerable

Type Parameters

T
The item type of the collection.

Remarks

To use CollectionBase as a base class, the derived class must override the Count, GetEnumerator, Add, Clear, and Remove methods.

ICollection<T>.Contains need not be implemented by the derived class, but it should be strongly considered, because the CollectionBase implementation may not be very efficient.

Inheritance Hierarchy

See Also